package com.tjnu.baiyi.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ActionSupport;
import com.tjnu.baiyi.dao.TbAlbumDAO;
import com.tjnu.baiyi.dao.TbAlbumTypeDAO;
import com.tjnu.baiyi.dao.TbAlbumVisitorDAO;
import com.tjnu.baiyi.dao.TbCommentDAO;
import com.tjnu.baiyi.dao.TbFriendDAO;
import com.tjnu.baiyi.dao.TbMessageDAO;
import com.tjnu.baiyi.dao.TbPhotoDAO;
import com.tjnu.baiyi.dao.TbUserDAO;
import com.tjnu.baiyi.dao.TbVisitorDAO;
import com.tjnu.baiyi.entity.TbAlbum;
import com.tjnu.baiyi.entity.TbAlbumType;
import com.tjnu.baiyi.entity.TbAlbumVisitor;
import com.tjnu.baiyi.entity.TbComment;
import com.tjnu.baiyi.entity.TbFriend;
import com.tjnu.baiyi.entity.TbMessage;
import com.tjnu.baiyi.entity.TbPhoto;
import com.tjnu.baiyi.entity.TbUser;
import com.tjnu.baiyi.entity.TbVisitor;

public class BaseAction extends ActionSupport{
	private static final long serialVersionUID = 3248045851080311603L;
	// 注入dao
	@Autowired
	protected TbAlbumDAO tbAlbumDao;
	@Autowired
	protected TbAlbumTypeDAO tbAlbumTypeDao;
	@Autowired
	protected TbAlbumVisitorDAO tbAlbumVisitorDao;
	@Autowired
	protected TbCommentDAO tbCommentDao;
	@Autowired
	protected TbFriendDAO tbFriendDao;
	@Autowired
	protected TbMessageDAO tbMessageDao;
	@Autowired
	protected TbPhotoDAO tbPhotoDao;
	@Autowired
	protected TbUserDAO tbUserDao;
	@Autowired
	protected TbVisitorDAO tbVisitorDao;

	HttpSession session = ServletActionContext.getRequest().getSession();
	HttpServletRequest request = ServletActionContext.getRequest();
	// 对象
	protected TbAlbum album;
	protected TbAlbumType albumType;
	protected TbAlbumVisitor albumVisitor;
	protected TbComment comment;
	protected TbFriend friend;
	protected TbMessage message;
	protected TbPhoto photo;
	protected TbUser user;
	protected TbVisitor visitor;

	public TbAlbum getAlbum() {
		return album;
	}

	public void setAlbum(TbAlbum album) {
		this.album = album;
	}

	public TbAlbumType getAlbumType() {
		return albumType;
	}

	public void setAlbumType(TbAlbumType albumType) {
		this.albumType = albumType;
	}

	public TbAlbumVisitor getAlbumVisitor() {
		return albumVisitor;
	}

	public void setAlbumVisitor(TbAlbumVisitor albumVisitor) {
		this.albumVisitor = albumVisitor;
	}

	public TbComment getComment() {
		return comment;
	}

	public void setComment(TbComment comment) {
		this.comment = comment;
	}

	public TbFriend getFriend() {
		return friend;
	}

	public void setFriend(TbFriend friend) {
		this.friend = friend;
	}

	public TbMessage getMessage() {
		return message;
	}

	public void setMessage(TbMessage message) {
		this.message = message;
	}

	public TbPhoto getPhoto() {
		return photo;
	}

	public void setPhoto(TbPhoto photo) {
		this.photo = photo;
	}

	public TbUser getUser() {
		return user;
	}

	public void setUser(TbUser user) {
		this.user = user;
	}

	public TbVisitor getVisitor() {
		return visitor;
	}

	public void setVisitor(TbVisitor visitor) {
		this.visitor = visitor;
	}

}
